package com.tushu.service;

import com.tushu.entity.Admin;
import com.tushu.util.JdbcUtil;

import java.util.List;

public class AdminService {

    /**
     * 登录
     * @param obj
     * @return
     */
    public Admin login(List<Object> obj) {
        String sql="select * from admin where account=? and pwd=?";
        List<Admin> dto= JdbcUtil.executeQuery(sql, obj,Admin.class);
        if(dto!=null&&dto.size()>=1){
            return dto.get(0);
        }
        return null;
    }


}
